package com.danciyixue.boot.client.testQuestion.controller;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.danciyixue.boot.common.result.PageResult;
import com.danciyixue.boot.dcyx.model.query.TestQuestionsQuery;
import com.danciyixue.boot.dcyx.model.vo.TestQuestionsVO;
import com.danciyixue.boot.dcyx.service.TestQuestionsService;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 客户端测试题目控制器
 */
@Tag(name = "18. 测试题目", description = "测试题目")
@RestController
@RequestMapping("/api/client/v1/test-question")
@RequiredArgsConstructor
public class DcyxTestQuestionController {

    private final TestQuestionsService testQuestionsService;

    /**
     * 获取测试题目数据
     */
    @GetMapping("/page")
    public PageResult<TestQuestionsVO> page(TestQuestionsQuery queryParams) {
        IPage<TestQuestionsVO> page = testQuestionsService.getTestQuestionsPage(queryParams);
        return PageResult.success(page);
    }
} 